package game.screen;

import game.Constants;
import game.Person;
import game.manager.PersonManager;
import game.manager.ScreenManager;
import game.modifier.PersonModifier;
import game.modifier.PersonModifier.ModifyField;
import game.screen.option.BackOption;
import game.screen.option.ForwardOption;
import game.screen.option.ScreenOption;
import game.screen.option.action.Action;

import java.util.List;
import java.util.Vector;

public class ActionScreen extends Screen {

	@Override
	public void draw() {
	}

	@Override
	public String getTitle() {
		return Constants.ACTION_SCREEN_TITLE;
	}

	@Override
	protected List<ScreenOption> getOptions() {
		Vector<ScreenOption> options = new Vector<ScreenOption>();
		options.add(new Action(Constants.ACTION_WORKOUT,
				Constants.ACTION_WORKOUT_CASH, Constants.ACTION_WORKOUT_ENERGY,
				PersonManager.getManager().getUser()) {

			@Override
			public void result(Person person) {
				final PersonModifier modifier = new PersonModifier(
						Constants.ACTION_WORKOUT_DURATION);
				modifier.modifyField(ModifyField.LOOKS,
						Constants.ACTION_WORKOUT_LOOKS_CHANGE);
				modifier.modifyField(ModifyField.EXTRAVERSION,
						Constants.ACTION_WORKOUT_EXTRAVERSION_CHANGE);
				modifier.modifyField(ModifyField.EXTRAVERSION,
						Constants.ACTION_WORKOUT_EXTRAVERSION_CHANGE);
				person.addModifier(modifier);
			}
		});
		options.add(new ScreenOption(Constants.VIEW_PEOPLE) {
			@Override
			public void select() {
				ScreenManager.getManager().activateScreen(
						new PeopleViewerScreen());
			}
		});
		options.add(new BackOption());
		options.add(new ForwardOption());
		return options;
	}
}
